import request from "../../utils/request.js"
const state ={
	CateData:{},
}
const mutations={
	SAVE_CATELIST(state,CateData){
		state.CateData=CateData
	}
}
const actions={
	//获取分页的数据
	async getCateList({commit}){
		const result=await request('/getCateList')
		console.log('cate_result1',result);
		commit('SAVE_CATELIST',result)
	}
}
const getters={
	cateList(state){
		return state.CateData.categorys || []
	}
}
export default{
	state,
	mutations,
	actions,
	getters,
}